/**
 * 
 */
package controller;
 
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import view.PrincipalView;
//import beans.Professor;
//import daos.DAOProfessorImpl;

/**
 * @author marcel
 *
 */
public class PrincipalController {
	private ActionListener uCListener = null;
	private PrincipalView view = null;
	
	public PrincipalController() {
		this.view  = new PrincipalView();
		view.run();
	}
	
	public PrincipalController( PrincipalView g ) {
		this.view  = g;
		view.run();
	}
	
	class ActionHandler implements ActionListener {
		public void actionPerformed(ActionEvent event) {

			// TODO if's para selecionar o tipo de view q esta chamando 
			
			if (event.getSource() == view) {
				uCListener.actionPerformed(event);  
			} // if (event.getSource() == view) 
		} // actionPerformed

	} // class ActionHandler 

	public ActionListener getUCListener() {
		return uCListener;
	}

	public void setUCListener(ActionListener listener) {
		uCListener = listener;
	}
	
}
